//
//  HouseTakeTableViewCell.m
//  sellHouse
//
//  Created by 李 佳伟 on 2018/11/28.
//  Copyright © 2018年 李 佳伟. All rights reserved.
//

#import "HouseTakeTableViewCell.h"
#import "HouseTakeModel.h"
#import "JTCSM.h"
static CGFloat labelheight = 15;
@interface HouseTakeTableViewCell ()
{
    UILabel *_timeLable;
    UILabel *_contentLabel;
}

@end

@implementation HouseTakeTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        UIView *lineview = [[UIView alloc]initWithFrame:CGRectMake(Kspace+(dianviewsize-1)/2, 0, 1, cellHeight)];
        lineview.backgroundColor = RGBACOLOR(241, 241, 241, 1);
        [self.contentView addSubview:lineview];
        
        _timeLable = [UILabel initWithFrame:CGRectZero text:@"" font:15 textAlignment:NSTextAlignmentLeft texcolor:RGBACOLOR(151, 151, 151, 1) backgroundColor:nil];
        [self.contentView addSubview:_timeLable];
        _contentLabel = [UILabel initWithFrame:CGRectZero text:@"" font:15 textAlignment:NSTextAlignmentLeft texcolor:RGBACOLOR(31, 31, 31, 1) backgroundColor:nil];
        [self.contentView addSubview:_contentLabel];
        
    }
    
    return self;
}


- (void)setvalueWithModel:(id)model{
    HouseTakeModel *mymodel = model;
    
    _timeLable.text = mymodel.time;
    CGRect rect = [df labelHeightWithContent: _timeLable.text height:labelheight font:15];
    _timeLable.frame = CGRectMake(Kspace+dianviewsize+10, 0, rect.size.width, labelheight);
    
    _contentLabel.text = mymodel.operateName;
    _contentLabel.frame = CGRectMake(KVIEW_X(_timeLable)+25, 0, KSCREENWidth-2*Kspace-dianviewsize-rect.size.width-10-25, labelheight);
    
    
}

@end
